Oracle® OLAP Analytic Workspace Java API Reference
10g Release 2 (10.2)

B14351-02

oracle.AWXML
Class Measure

java.lang.Object
  |
  +--oracle.AWXML.BaseObject
        |
        +--oracle.AWXML.Measure
Direct Known Subclasses:
DerivedMeasure, OlapMeasure

public class Measure
extends BaseObject
implements DerivedMeasureInput

A BaseObject that represents an OLAP measure. A measure value is a simple fact, typically numeric and additive, such as unit cost or amount of units sold.

A Measure is owned by a Cube. To create a Measure, use the createMeasure method of a Cube.

The subclasses of Measure are DerivedMeasure and OlapMeasure. For a diagram of the class hierarchy of Measure, see Measure Class Hierarchy. A DerivedMeasure has values than an analytic workspace derives from existing data by using a mathematical operation or a data transformation. Examples of derived values include averages, totals, percentages, and differences. An OlapMeasure has values that result from an OLAP operation, such as a lead, lag, or moving average operation.

A Measure can have an AggregationDefinition that specifies the aggregation rules for the Measure. You can use the setAutoSolve method to specify whether the analytic workspace automatically calculates the aggregate values of the Measure when it builds the Cube to which the Measure belongs. The build process is initiated by the Execute method of the AWAction.BuildDatabase class.

See Also:
Cube

Fields inherited from class oracle.AWXML.BaseObject
DATABASENULL

 

Constructor Summary
Measure(BaseObject input)
          Creates a Measure for the specified Cube.

 

Method Summary
 java.lang.String Alter(AWConnection connection)
          Alters the Measure in the current analytic workspace.
 java.lang.String Create(AWConnection connection)
          Creates the Measure in the current analytic workspace of the specified database connection.
 java.lang.String Delete(AWConnection connection)
          Deletes the Measure in the current analytic workspace of the specified database connection.
 java.lang.String getAutoSolve()
          Gets a String that indicates whether the analytic workspace automatically calculates the aggregate values of Measure when building the parent Cube.
 java.lang.String getDataType()
          Gets the data type of the Measure.
 SolveDefinition getSolveDefinition()
          Gets the default AggregationDefinition for the Measure.
 void setAutoSolve(java.lang.String input)
          Specifies whether the analytic workspace automatically calculates the aggregate values of the Measure when it builds the parent Cube.
 void setDataType(java.lang.String input)
          Specifies the data type of the Measure.
 void setSolveDefinition(SolveDefinition input)
          Specifies the default AggregationDefinition for the Measure.
 java.lang.String WriteToXML()
          Gets an XML representation of the Measure.

 

Methods inherited from class oracle.AWXML.BaseObject
CreateAfter, CreateBefore, CreateFirst, DataRead, getColumnName, getId, getLongName, getLongName, getName, getOwner, getPluralName, getPluralName, getSchema, getShortName, getShortName, setColumnName, setLongName, setLongName, setName, setPluralName, setPluralName, setSchema, setShortName, setShortName

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

Measure

public Measure(BaseObject input)
Creates a Measure for the specified Cube.
Parameters:
input - The Cube to own the Measure.

Method Detail

setDataType

public void setDataType(java.lang.String input)
Specifies the data type of the Measure. Supported data types are the following.
  DECIMAL
  INTEGER
  NUMBER
  TEXT
Parameters:
input - A String that contains the data type.

getDataType

public java.lang.String getDataType()
Gets the data type of the Measure.
Returns:
A String that contains the data type.

setAutoSolve

public void setAutoSolve(java.lang.String input)
Specifies whether the analytic workspace automatically calculates the aggregate values of the Measure when it builds the parent Cube. When it automatically solves the Measure, the analytic workspace uses the default AggregationDefinition of the Measure.

The following table lists the acceptable values for the input parameter and the action specified by the value.

Input Value Action Specified
AUTO_SOLVE Automatically calculate the aggregate values for the Measure. Use the default AggregationDefinition in calculating the values.
NO_AUTO_SOLVE Do not calculate the aggregate values for the Measure.
DEFAULT Use the setting for automatically calculating aggregate values specified by the parent Cube.
Parameters:
input - A String that contains AUTO_SOLVE, NO_AUTO_SOLVE, or DEFAULT.

getAutoSolve

public java.lang.String getAutoSolve()
Gets a String that indicates whether the analytic workspace automatically calculates the aggregate values of Measure when building the parent Cube. The value returned by this method is one of the following.

For a description of these values, see setAutoSolve(java.lang.String)

Returns:
A String that indicates whether the analytic workspace automatically calculates the aggregate values of the Measure.

WriteToXML

public java.lang.String WriteToXML()
Gets an XML representation of the Measure.
Overrides:
WriteToXML in class BaseObject
Returns:
A String that is an XML representation of the Measure.

setSolveDefinition

public void setSolveDefinition(SolveDefinition input)
Specifies the default AggregationDefinition for the Measure.
Parameters:
input - The AggregationDefinition to specify as the default for the Measure.

getSolveDefinition

public SolveDefinition getSolveDefinition()
Gets the default AggregationDefinition for the Measure.
Returns:
The default AggregationDefinition.

Create

public java.lang.String Create(AWConnection connection)
Creates the Measure in the current analytic workspace of the specified database connection. If it cannot create the Measure, then this method throws an AWException exception.
Overrides:
Create in class BaseObject
Parameters:
connection - The AWConnection that represents the database connection.
Returns:
A String that contains success if the method creates the Measure.

Alter

public java.lang.String Alter(AWConnection connection)
Alters the Measure in the current analytic workspace. If it cannot alter the Measure, then this method throws an AWException exception.
Overrides:
Alter in class BaseObject
Parameters:
connection - The AWConnection that represents the database connection.
Returns:
A String that contains success if the method alters the Measure.

Delete

public java.lang.String Delete(AWConnection connection)
Deletes the Measure in the current analytic workspace of the specified database connection. If it cannot delete the Measure, then this method throws an AWException exception.
Overrides:
Delete in class BaseObject
Parameters:
connection - The AWConnection that represents the database connection.
Returns:
A String that contains success if the method deletes the Measure.

Oracle® OLAP Analytic Workspace Java API Reference
10g Release 2 (10.2)

B14351-02

Copyright © 2003, 2005 Oracle. All rights reserved.